A data processing apparatus may perform a great variety of data processing operations, some of which require it to determine whether a sequence of predefined values, sometimes referred to as a substring, is present in given input data. The complexity of the data processing circuitry required to implement such a capability can become burdensome for large input data items.